home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.006 / xemacs-1 / lib / xemacs-19.13 / info / evi.info < prev    next >
Encoding:
GNU Info File  |  1995-09-01  |  33.3 KB  |  842 lines

  1. This is Info file ../info/evi.info, produced by Makeinfo-1.55 from the
  2. input file evi.texinfo.
  3.  
  4.    This file documents Evi - a vi emulator for GNU Emacs
  5.  
  6.    Copyright (C) 1992, 1993  Jeffrey R. Lewis
  7.  
  8.    Permission is granted to make and distribute verbatim copies of this
  9. manual provided the copyright notice and this permission notice are
  10. preserved on all copies.
  11.  
  12.    Permission is granted to copy and distribute modified versions of
  13. this manual under the conditions for verbatim copying, provided that
  14. the entire resulting derived work is distributed under the terms of a
  15. permission notice identical to this one.
  16.  
  17.    Permission is granted to copy and distribute translations of this
  18. manual into another language, under the same conditions as for modified
  19. versions.
  20.  
  21. 
  22. File: evi.info,  Node: Top,  Next: Overview,  Prev: (DIR),  Up: (DIR)
  23.  
  24. * Menu:
  25.  
  26. * Overview::            What is Evi?
  27. * Setting up Evi::        How to start using Evi
  28. * File and buffer management::    How vi file and buffer commands
  29.                 work under Evi, plus Evi extensions
  30. * Window management::        How vi window management commands
  31.                 work under Evi, plus Evi extensions
  32. * Emacs commands::        How to access emacs commands from Evi
  33. * Emacs editing modes::        Taking advantage of emacs editing modes
  34. * Customizing::            How to customize Evi
  35. * Arrow keys::            How to use the arrow keys
  36. * Enhancements::        Various Evi enhancements to vi
  37. * New operators::        New commands that operate over regions
  38. * Differences::            Differences between Evi and vi
  39. * Ex commands::            Supported ex commands and variable settings
  40. * Note to vip users::        Differences between Evi and vip
  41. * Bugs::            What to do if things go wrong
  42. * Mailing list::        How to join and submit to the Evi mailing list
  43. * Getting a copy of Evi::    How and where to get more recent copies of Evi
  44. * Credits::            Who contributed to Evi
  45.  
  46. 
  47. File: evi.info,  Node: Overview,  Next: Setting up Evi,  Prev: Top,  Up: Top
  48.  
  49.    Evi is a vi emulator aimed at those who are either just plain
  50. accustomed to vi, or who just simply happen to like its style of
  51. editing better than emacs' default.  Evi's first goal is vi
  52. compatibility.  Its second goal is to be an extension of vi, taking
  53. advantage of features supplied by the emacs environment, without simply
  54. becoming emacs with vi'ish key bindings.
  55.  
  56.    Ideally, you shouldn't need any special manual to start using Evi,
  57. other than your vi manual.  By default evi is set-up to emulate vi as
  58. closely as possible, including using your EXINIT environment variable
  59. and/or .exrc startup files.  Of course, you'll need to know how to get
  60. started with Evi, and you'll probably want to take advantage of some of
  61. Evi's extensions, and be aware of what's different between vi and Evi.
  62. That's what this manual covers.
  63.  
  64.    A note on conventions used in this manual: `M-x' means the escape
  65. key followed by the character x (where x is any character), `C-x' means
  66. control-x, RET means the return key, ESC means the escape key.
  67.  
  68. 
  69. File: evi.info,  Node: Setting up Evi,  Next: File and buffer management,  Prev: Overview,  Up: Top
  70.  
  71. Setting up Evi
  72. ==============
  73.  
  74.    To just test Evi out, type:
  75.      M-x load-file RET evi.el RET
  76.      M-x evi RET
  77.    (don't type the spaces) You will now be in the emulator.
  78.  
  79.    If you have any trouble at this point due to something in your
  80. `.exrc' or `EXINIT', and wish to suppress sourcing of `.exrc' and
  81. `EXINIT', place the following in your `.emacs':
  82.      (setq evi-supress-ex-startup t)
  83.    Then, send me a note with the contents of your `.exrc' and `EXINIT'
  84. so we can fix the problem.
  85.  
  86.    If you decide to continue using Evi, I would recommend first you byte
  87. compile it to speed things up, using the following shell command:
  88.      emacs -batch -l evi.el -f batch-byte-compile evi.el
  89.    Next, if you want to use Evi all the time, put the following at the
  90. end of your `.emacs' file:
  91.      (load "<wherever-evi-is>/evi")
  92.      (setq term-setup-hook 'evi)
  93.    this will make emacs go into Evi every time you fire it up.  Of
  94. course, you may wish to have Evi properly installed for all to use -
  95. consult your local emacs guru.
  96.  
  97. 
  98. File: evi.info,  Node: File and buffer management,  Next: Window management,  Prev: Setting up Evi,  Up: Top
  99.  
  100. File and buffer management
  101. ==========================
  102.  
  103.    Vi's file management commands have long tried to mimic having
  104. multiple buffers, and as such, work well enough to use in an emacs
  105. setting.  They of course have to take on slightly different meanings,
  106. since it makes little sense to emulate the limitations of the vi/ex
  107. model that presumably you are trying to avoid by using Evi!
  108.  
  109. `:e'
  110.      Edit a file in the current window.  With no argument, brings in a
  111.      new copy of the file (useful if it has been subsequently modified
  112.      on disk).  `:e!' will override any complaints about the current
  113.      buffer being modified, and discards all modifications.  With a
  114.      filename argument, edits that file in the current window (using
  115.      the copy already in the editor if it was previously read in).
  116.      There is no difference between `:e! filename' and `:e filename',
  117.      because in Evi we don't need to worry about the disposition of the
  118.      current file before editing the next one.  Use `:e#' as a
  119.      shorthand for editing the most recently accessed buffer not
  120.      visible in a window.
  121.  
  122. `:E'
  123.      Same as `:e', but edits the file in another window, creating that
  124.      window if necessary.  If used with no filename, this command
  125.      splits the current buffer into two windows.
  126.  
  127. `:n'
  128.      Switch to the next file in buffer list that's not currently
  129.      displayed.  Rotates the current file to the end of the buffer
  130.      list, so repeated use of `:n' will cycle thru all buffers.
  131.  
  132. `:N'
  133.      Same as `:n', but switches to another window, or creates another
  134.      window and puts the next file into it.
  135.  
  136. `:b'
  137.      This is an extension.  This command switches the current window to
  138.      the specified buffer, e.g. `:b foo' would switch to the buffer
  139.      named `foo' (if it exists).  By default `:b' switches to the next
  140.      buffer not displayed.  `:b!' will create the buffer if it doesn't
  141.      exist.
  142.  
  143. `:B'
  144.      Analogous to :E and :N.
  145.  
  146. `:k'
  147.      Another extension.  This command kills the named buffer.  If given
  148.      no argument, kills the current buffer.  `:k!' will kill the buffer
  149.      even if it is modified.
  150.  
  151. `:wk'
  152.      Writes the current buffer, and kills it.
  153.  
  154. `:W'
  155.      Another extension.  This command writes all modified buffers,
  156.      querying the user before each write.  `:W!' will write all buffers
  157.      with no questions asked.
  158.  
  159. `:Wq'
  160.      As above, then exits emacs.  See `ZZ' below.
  161.  
  162.    The ex commands which accept filenames as arguments can be file
  163. completed using space or tab.  Similarly, `:b' and `:k' will
  164. buffer-name complete.  One thing you might find handy is `:b TAB' to
  165. see a list of buffers.  Use `C-c' or backspace to escape this.
  166.  
  167. 
  168. File: evi.info,  Node: Window management,  Next: Emacs commands,  Prev: File and buffer management,  Up: Top
  169.  
  170. Window management
  171. =================
  172.  
  173.    Vi had commands for multiple file management, but it never tried to
  174. pretend it handled multiple windows.  However, it did have the `z'
  175. command for simple window management, like making the window bigger or
  176. smaller.  In Evi, the `z' command is extended to handle most Emacs
  177. window management needs.  Additional suggestions are welcome.
  178.  
  179. `z0='
  180.      Delete the current window from the screen.
  181.  
  182. `z1='
  183.      Make the current window fill the screen.
  184.  
  185. `z2='
  186.      Split the current window in two vertically.
  187.  
  188. `z0|'
  189.      Same as `z0='.
  190.  
  191. `z1|'
  192.      Same as `z1='.
  193.  
  194. `z2|'
  195.      Split the current window in two horizontally.
  196.  
  197. `z<num>+'
  198. `z<num>-'
  199.      These two let you adjust the size of the current window by <num>.
  200.      Use z<num>. to adjust the window size absolutely.
  201.  
  202. `zf'
  203.      Go to the next window (forward).
  204.  
  205. `zn'
  206.      Same as `zf'.
  207.  
  208. `zb'
  209.      Go to the previous window (backward).
  210.  
  211. `zp'
  212.      Same as `zb'.
  213.  
  214. `zH'
  215. `zM'
  216. `zL'
  217.      These are aliases for `zRET', `z.', and `z-' and correspond to the
  218.      arguments to the mark command.
  219.  
  220. 
  221. File: evi.info,  Node: Emacs commands,  Next: Emacs editing modes,  Prev: Window management,  Up: Top
  222.  
  223. Accessing emacs commands
  224. ========================
  225.  
  226.    By default, no emacs commands are accessible from Evi.  However, the
  227. three main classes of emacs commands can easily be made accessible by
  228. adding selected elisp commands suggested below to your .evirc file.
  229.  
  230.    The `C-x' prefix commands integrate most easily with Evi since it
  231. would only override kill-line in input modes.  To access `C-x' prefix
  232. commands in all modes, use:
  233.      (evi-define-key evi-all-keymaps "\C-x" 'evi-emacs-command)
  234.    The Meta (or ESC prefix) commands are no problem if you just want to
  235. access them from the top-level, where in vi ESC only serves the purpose
  236. of ringing the bell, which in vi is a handy way of verifying that you're
  237. in command mode, but is not vital considering the emacs mode line.  Use
  238. the following to access Meta (or ESC prefix) commands only from the
  239. top-level:
  240.      (evi-define-key '(top-level) "\e" 'evi-emacs-command)
  241.    Accessing Meta (or ESC prefix) commands from other modes is
  242. problematic because ESC is the command to exit that mode.  However, if
  243. you wish, you can redefine the meta prefix to something else - I
  244. recommend `C-a'.  Thus to use Meta commands in all modes use:
  245.      (setq evi-meta-prefix-char ?\C-a)
  246.      (evi-define-key evi-all-keymaps "\C-a" (cons (current-global-map) ?\e))
  247.    The `C-c' prefix commands are also problematic because `C-c' is vi's
  248. interrupt character.  At the top-level, this is again not much of a
  249. problem, and you could use:
  250.      (evi-define-key '(top-level) "\C-c" 'evi-emacs-command)
  251.    `C-c' will still function as an interrupt character at all other
  252. places (including in the middle of a command, where it's most useful).
  253. In the various input modes you could forego `C-c' as your interrupt
  254. character and access the `C-c' prefix commands by using the following
  255. (presumably in addition to the above):
  256.      (evi-define-key '(input replace ex) "\C-c" 'evi-emacs-command)
  257.    Note that setting evi-insert-mode-local-bindings (described in the
  258. next section) will have the same effect because all `C-c' commands are
  259. local bindings.
  260.  
  261. 
  262. File: evi.info,  Node: Emacs editing modes,  Next: Customizing,  Prev: Emacs commands,  Up: Top
  263.  
  264. Taking advantage of emacs editing modes
  265. =======================================
  266.  
  267.    A number of emacs editing modes have handy local key bindings other
  268. than Meta, `C-x' and `C-c' prefix bindings.  For example, in C mode,
  269. RET does intelligent indenting, and `}' is bound to a command which
  270. automatically exdents.  By default, these aren't accessible of course,
  271. but you can have Evi enable these local bindings in insert mode by
  272. setting:
  273.      (setq evi-insert-mode-local-bindings t)
  274.    As current policy, however, Evi will not allow local mode bindings to
  275. override TAB, BS, or DEL, as well as, for obvious reasons, ESC.  ESC
  276. prefix commands, however, can be accessed as described in the previous
  277. section.
  278.  
  279. 
  280. File: evi.info,  Node: Customizing,  Next: Arrow keys,  Prev: Emacs editing modes,  Up: Top
  281.  
  282. Customizing Evi
  283. ===============
  284.  
  285.    Like vi, Evi will source your `.exrc' or `~/.exrc' file, and/or your
  286. `EXINIT' environment variable.  If your startup runs into problems, let
  287. me know - you shouldn't have to change your vi initialization stuff to
  288. make Evi happy.
  289.  
  290.    If you wish to use some Evi extensions in your startup, but still
  291. need to use vi, place these in `.exrc.evi', `~/.exrc.evi' or `EVIINIT'
  292. so that vi won't gag on them.
  293.  
  294.    Emacs lisp startup code for evi, such at that suggested in the
  295. previous sections, can be placed in either `.evirc' or `~/.evirc'.
  296.  
  297.    And you can, of course, hack away at the the Evi source code if you
  298. want something not easily addressed by the above methods.  If you feel
  299. what you've done would be generally useful, please email it to me, or
  300. post it.
  301.  
  302.    One particular customization, not covered elsewhere, is how Evi
  303. handles the current directory.  By default it behaves like vi - you
  304. have one global current directory, which you change using `:cd' (also
  305. see `:pushd', and friends described below).  Alternately, you may like
  306. the emacs behaviour better, which is that each buffer has its own idea
  307. of the current directory, and by default that directory is the directory
  308. that the file for that buffer resides in.  In this mode, you can also
  309. change the current directory using `:cd', but that will only affect the
  310. current buffer.  To get this behaviour, place the following in your
  311. `.evirc':
  312.      (setq evi-global-directory nil)
  313.  
  314.    Another customization you might like to make is to alter the
  315. behaviour of `ZZ'.  By default it is bound to `:Wq!', which quietly
  316. writes all modified files and exits.  If, however, you would like to be
  317. asked about each modified buffer before it is saved in order to avoid
  318. accidently saving a file you didn't want saved, map `ZZ' to `:Wq':
  319.      map ZZ :Wq\n
  320.  
  321. 
  322. File: evi.info,  Node: Arrow keys,  Next: Enhancements,  Prev: Customizing,  Up: Top
  323.  
  324. Arrow keys
  325. ==========
  326.  
  327.    If you like your arrow keys, there's one incompatibility that's not
  328. easily fixed under version 18 of emacs.  Vi recognizes arrow keys that
  329. send ESC prefixed sequences by using a very short timeout to determine
  330. the difference between an ESC typed by a person, and an ESC sequence
  331. sent by the terminal.  A compromise, if you happen to have such a
  332. terminal is to `:set notimeout', which makes `ESC ESC' behave like a
  333. single ESC and maps your arrow keys to `h', `j', `k', and `l'.  As a
  334. side effect in Evi, the normal emacs ESC prefix commands will be in
  335. effect (except for `ESC ESC' of course).  This could be undesirable if
  336. you're in the habit of hitting the escape key a lot to verify you're in
  337. command mode, and follow that immediately with a command.  This should
  338. be fixable in version 19 of emacs.
  339.  
  340. 
  341. File: evi.info,  Node: Enhancements,  Next: New operators,  Prev: Arrow keys,  Up: Top
  342.  
  343. Enhancements
  344. ============
  345.  
  346. * Menu:
  347.  
  348. * Edit repeat command::
  349. * Ex input escapes::
  350. * Extended undo::
  351. * Ex command completion::
  352. * Word definition::
  353. * Sentence and larger motions::
  354. * Directory commands::
  355. * Background shell commands::
  356. * Unnamed register::
  357. * New command counts::
  358. * Rectangle edits and arbitrary regions::
  359. * Shell window::
  360. * Extended marks::
  361. * Register enhancements::
  362. * Language/mode specific editing::
  363.  
  364. 
  365. File: evi.info,  Node: Edit repeat command,  Next: Ex input escapes,  Up: Enhancements
  366.  
  367. Edit repeat command
  368. -------------------
  369.  
  370.    `_' is a new version of the repeat command `.' that prompts you with
  371. the keystrokes to repeat, allowing you to edit them before executing.
  372. This is particularly useful for the abovementioned complex operators.
  373. If you don't wish to re-execute the command, just hit `C-c'.
  374.  
  375. 
  376. File: evi.info,  Node: Ex input escapes,  Next: Extended undo,  Prev: Edit repeat command,  Up: Enhancements
  377.  
  378. Ex input escapes
  379. ----------------
  380.  
  381.    If you put
  382.      (setq ex-input-escapes t)
  383.    in your `.evirc', then Ex (`:') commands will accept the following
  384. escapes: `\e' for ESC, `\n' for newline, `\r' for RET, and `\C-x' for
  385. control-x (for all valid control characters).  `\' otherwise works like
  386. `C-v'.  Thus:
  387.      map \  \C-f
  388.    would make the space character be page forward, and
  389.      map g \|
  390.    would make `g' be goto-column.  Note that `|' is normally a command
  391. separator and thus must be escaped.
  392.  
  393. 
  394. File: evi.info,  Node: Extended undo,  Next: Ex command completion,  Prev: Ex input escapes,  Up: Enhancements
  395.  
  396. Extended undo
  397. -------------
  398.  
  399.    The command `[u' continues the previous undo, by undoing one more
  400. change previous to the last change undone.  Thus, a long enough
  401. sequence of `[u's will take you back to the unmodified state.  If you
  402. went back too far, a `u' will reverse this process, and subsequent
  403. `[u's will move forward through the changes.  Note that vip does this
  404. using repeat command (`.'); however, that conflicts with the meaning of
  405. `u.' in vi, which is: `undo, then do again'.  This is quite handy for
  406. reapplying a change that you initially did in the wrong place, so evi
  407. leaves that meaning alone, and defines a new command for `extended
  408. undo'.  Personally, I use `extended undo' more than `undo line', so I
  409. swap the two definitions in my .evirc:
  410.      (evi-define-key '(vi) "[u" 'evi-undo-line)
  411.      (evi-define-key '(vi) "U" 'evi-undo-more)
  412.  
  413. 
  414. File: evi.info,  Node: Ex command completion,  Next: Word definition,  Prev: Extended undo,  Up: Enhancements
  415.  
  416. Ex command completion
  417. ---------------------
  418.  
  419.    In Ex (`:') commands, you can use the TAB to perform completion on
  420. the following: commands, variable names (:set), filenames, buffernames,
  421. maps, or abbreviations.  Which completion to perform is determined
  422. solely by where you are in the partial command you are typing.  For
  423. example:
  424.      :set erTAB
  425.    would complete to:
  426.      :set errorbells
  427.    (leaving the cursor after the `s' in `errorbells'.
  428.  
  429. 
  430. File: evi.info,  Node: Word definition,  Next: Sentence and larger motions,  Prev: Ex command completion,  Up: Enhancements
  431.  
  432. Word definition
  433. ---------------
  434.  
  435.    You can define exactly what Evi treats as words for the w, b, e, W, B
  436. and E commands.  They are defined by setting either or both of the new
  437. options `word' (for w, b and e) or `Word' (for W, B and E) to a regular
  438. expression describing what words look like.  For example, here's a
  439. definition of words that only considers alphanumeric words:
  440.      set word=[a-zA-Z0-9]+
  441.    Contrast this with the default definition:
  442.      [a-zA-Z0-9_]+\\\|[^a-zA-Z0-9_\ \t\n]+\\\|^[\ \t]*\n
  443.    See the emacs documentation on regular expressions for details.
  444.  
  445. 
  446. File: evi.info,  Node: Sentence and larger motions,  Next: Directory commands,  Prev: Word definition,  Up: Enhancements
  447.  
  448. Sentence and larger motions
  449. ---------------------------
  450.  
  451.    My interpretation of sentence, paragraph, and section motion differs
  452. somewhat from vi's in that they behave more analogously to how word
  453. motion behaves - e.g. a forward paragraph takes you to the beginning of
  454. the next paragraph - not the blank line after the previous paragraph.
  455. However, when doing a delete using one of these motions, unless you are
  456. at the beginning of the sentence, paragraph or section, the delete will
  457. only happen to the end of the sentence, paragraph or section, not to the
  458. beginning of the next.  I find this *much* more useful than the vi
  459. behaviour - if you disagree, please let me know.
  460.  
  461. 
  462. File: evi.info,  Node: Directory commands,  Next: Background shell commands,  Prev: Sentence and larger motions,  Up: Enhancements
  463.  
  464. Directory commands
  465. ------------------
  466.  
  467.    `:pushd', `:popd' and `:dirs' commands exist, similar to those found
  468. in csh and bash.  Note these only make sense in conjunction with
  469. evi-global-directory = t (which is the default).
  470.  
  471. 
  472. File: evi.info,  Node: Background shell commands,  Next: Unnamed register,  Prev: Directory commands,  Up: Enhancements
  473.  
  474. Background shell commands
  475. -------------------------
  476.  
  477.    The `:!' command now takes an optional `&' (as in `:!&'), which
  478. causes the shell command to be executed asynchronously, with the output
  479. going to the window `*Shell Command Output*'.
  480.  
  481. 
  482. File: evi.info,  Node: Unnamed register,  Next: New command counts,  Prev: Background shell commands,  Up: Enhancements
  483.  
  484. Unnamed register
  485. ----------------
  486.  
  487.    The unnamed register (where deleted text goes) is preserved across
  488. excursions into insert mode, etc.  This means you can delete something,
  489. insert something, then `put' the deleted text.  In vi, for no apparent
  490. reason, you can't do this, even though insert mode doesn't use the
  491. unnamed register.
  492.  
  493.    The unnamed register is also preserved between buffers, so you can
  494. yank text in one buffer and put it into another.
  495.  
  496. 
  497. File: evi.info,  Node: New command counts,  Next: Rectangle edits and arbitrary regions,  Prev: Unnamed register,  Up: Enhancements
  498.  
  499. New command counts
  500. ------------------
  501.  
  502.    Several commands that didn't take counts in vi take counts in Evi.
  503. `p' and `P' take a prefix count and will put the text that many times,
  504. regardless of the size of the text - vi will apparently only do the
  505. prefix count for less than line sized text.  `/' takes a prefix count to
  506. find the nth occurence of a string.  `D' takes a count (I could never
  507. figure out why it didn't, since `C' takes a count).
  508.  
  509. 
  510. File: evi.info,  Node: Rectangle edits and arbitrary regions,  Next: Shell window,  Prev: New command counts,  Up: Enhancements
  511.  
  512. Rectangle edits and arbitrary regions
  513. -------------------------------------
  514.  
  515.    In vi, you do most of your editing based on regions defined by vi's
  516. motion commands.  For example, `dw' deletes the region starting at the
  517. current cursor location and extending up to where the cursor would be
  518. if you'd typed `w'.  Those edit commands that don't explicitly use a
  519. motion command are just shorthand for ones that do: e.g. `x' is
  520. shorthand for `dl'.
  521.  
  522.    However, this doesn't give you a convenient way of operating on
  523. arbitrary rectangular regions, or regions that are inconvenient to
  524. describe by a single motion command.  Evi allows you to operate on such
  525. regions by a special form of the `m' (mark) command, and several new
  526. commands that are only understood when they are operands to edit
  527. operators (such as `c', `d', `>', etc).
  528.  
  529.    The basic idea is that you will define a region by two points.  For
  530. a rectangle region, for example, you will define two opposite corners.
  531. You define the first point by using `m.'.  Then you move to the second
  532. point and execute the operator you want, specifying the motion to be
  533. one of: `r' for rectangle, `R' for rows, `C' for columns, and `a' for
  534. arbitrary (meaning everything between the marked point and where the
  535. cursor currently is).
  536.      m.3j5wda
  537.    would delete the text from where the cursor started to 3 lines down
  538. and 5 words over.  `R' is often handy for operating on large arbitrary
  539. sections of text, for example say you needed to shift some text that ran
  540. on for several pages and you weren't sure just how long it was at the
  541. start:
  542.      m.`C-f'`C-f'jjj>R
  543.  
  544. 
  545. File: evi.info,  Node: Shell window,  Next: Extended marks,  Prev: Rectangle edits and arbitrary regions,  Up: Enhancements
  546.  
  547. Shell window
  548. ------------
  549.  
  550.    `:shell' starts up an emacs shell in the current window (instead of
  551. suspending emacs, and starting a subshell).  The shell to run comes from
  552. the vi variable `ishell', and defaults to the value of the environment
  553. variable `SHELL'.  `:gdb program' starts up gdb in the current window on
  554. the specified program.  For both of these, you are automatically placed
  555. in insert mode, where you should be able to interact as you would expect
  556. to, except that ESC will take you into command mode.  While in command
  557. mode, hitting return will send the current line as input to the
  558. shell/gdb, similar to command-line editing vi-style in bash, but will
  559. leave you in command mode.
  560.  
  561. 
  562. File: evi.info,  Node: Extended marks,  Next: Register enhancements,  Prev: Shell window,  Up: Enhancements
  563.  
  564. Extended marks
  565. --------------
  566.  
  567.    The marks used by the mark command `m' are emacs markers, thus they
  568. mark a position in a buffer, not necessarily the current one.  This
  569. affects the goto mark commands ``' and `''.  For example, if mark `a'
  570. is placed in one buffer, then later in another buffer, the command ``a'
  571. is typed, evi will first switch to that buffer, then go to the location
  572. in that buffer.  `'' and ``' also accept `.' and `,' for pop context,
  573. and unpop context respectively.  Thus, `'.' will take you to the
  574. previous context (defined as in vi by a region of relative motion, with
  575. an `absolute' motion pushing a new context.  quotes surround `absolute'
  576. because a search is considered an absolute motion for this purpose),
  577. and `'.' will take you to the context before that.  There is a ring of
  578. 10 contexts so after 10 `'.' commands you'll end up at the original
  579. previous context.  `Unpop context' means move forward thru the ring.
  580. `''' and ```' are defined as exchange current location with the location
  581. of the previous context.  The context ring is buffer local, so use of it
  582. will always keep you in the same buffer.
  583.  
  584. 
  585. File: evi.info,  Node: Register enhancements,  Next: Language/mode specific editing,  Prev: Extended marks,  Up: Enhancements
  586.  
  587. Register enhancements
  588. ---------------------
  589.  
  590.    Two changes involving registers.  First, `"'', and `""', are new
  591. commands which allow you to insert literal text directly into a
  592. register.  `"'' inserts a single character, and `""' inserts a string.
  593. E.g.  `""helloESC' inserts the string `hello' into the unnamed
  594. register, and `"a"'/' inserts a slash into register a.  The choice of
  595. command names are intuitive (they suggest quotes around a literal
  596. char/string), albeit unfortunate because `"' is supposed to be the
  597. prefix for a register specification, not a command.  Second, the
  598. register specification `"^' specifies appending to the unnamed register
  599. (the one that gets used when no register is specified).  E.g.,
  600. `"^""ickESC' appends `ick' to the unnamed register.
  601.  
  602. 
  603. File: evi.info,  Node: Language/mode specific editing,  Prev: Register enhancements,  Up: Enhancements
  604.  
  605. Language/mode specific editing
  606. ------------------------------
  607.  
  608.    `%' exhibits language sensitivity in that it ignores parentheses
  609. embedded in quotes.  What defines quotes is based on what minor mode
  610. emacs is in (such as c-mode or lisp-mode), or you can roll your own (see
  611. emacs command modify-syntax-entry).
  612.  
  613.    `=' is no longer specific to `:set lisp'.  It indents according to
  614. the mode.  See emacs command indent-according-to-mode.
  615.  
  616. 
  617. File: evi.info,  Node: New operators,  Next: Differences,  Prev: Enhancements,  Up: Top
  618.  
  619. New operators
  620. =============
  621.  
  622.    The `*' operator can be used to send text to emacs processes.  `*'
  623. prompts for the name of a process buffer, and the region specified is
  624. sent to that process.  Subsequent invocations of `*' will use the same
  625. process buffer as last specified as a default.  E.g., to send the
  626. current line of text as a command to the emacs shell (see `:shell'),
  627. type `***shell*RET', or if the shell is already the default, just
  628. `**RET'.  Paragraph motion or parenthesis match is often perfect for
  629. sending function definitions to an interpreter, e.g. place the cursor at
  630. the beginning of the function, and type `*}RET' or `*%RET'.  If the
  631. function def is less easily described you can use `m.' and `yR'
  632. described above.  In specifiying the process buffer, you can use buffer
  633. completion using space or tab.
  634.  
  635.    I'm experimenting with some new complex operators.  I'm particularly
  636. interested in your thoughts on these:
  637.  
  638.    `[{' operates over lines in a region.  It takes a motion, and a
  639. sequence of operations to perform on each line in the region defined by
  640. the motion.  The sequence of operations is prompted for on the bottom
  641. line.  Double the `{' to operate on whole lines.  The point starts in
  642. the first column for each line operated on.  For example:
  643.      [{}i> `C-v'ESCRET
  644.    would prefix every line in the rest of the current paragraph with `>
  645. '.  The `C-v ESC' sequence inserts an ESC into the string you are
  646. entering so that it will terminate input when the loop body is executed,
  647. not as you are entering the command.  For example:
  648.      10[{{i/* `C-v'ESCA */`C-v'ESCRET
  649.    would place C-style comments around the next 10 lines.
  650.  
  651.    `[(' defines a parameterized macro body.  A parameterized macro is
  652. diff- erent from standard macro text in that it is parameterized by
  653. prefix count and register specification.  In the body of such a macro,
  654. there are two special commands: `#' and `&'.  `#' is replaced by the
  655. prefix count applied to this macro, and `&' is replaced by the register
  656. specification applied to this macro.  For example:
  657.      "a8[(j#w&dwRET
  658.    would go down one line, move over 8 words, then delete the next word
  659. into register `a'.  This is rather contrived, but it gives you the idea.
  660. Param- eterized macro bodies are obviously not very useful typed out
  661. each time, and are intended to be the body of a map macro.  For example:
  662.      :map M [(j#w&dw\eRET
  663.      "a8M
  664.    would be a much more likely scenario for the use of such a macro.
  665.  
  666. 
  667. File: evi.info,  Node: Differences,  Next: Ex commands,  Prev: New operators,  Up: Top
  668.  
  669. Differences
  670. ===========
  671.  
  672.    The following vi commands behave differently in Evi or not
  673. implemented:
  674.  
  675. `C-@'
  676.      (insert mode only) Not implemented.
  677.  
  678. `C-q'
  679.      Not implemented.
  680.  
  681. `C-['
  682.      Doesn't always do the right thing, and it doesn't do the timeout
  683.      trick necessary to allow it to recognize keypad sequences.
  684.  
  685. `#'
  686.      Not implemented.
  687.  
  688. `Q'
  689.      Quits evi mode, returning you to emacs, similiar to the way `Q' in
  690.      vi quits visual mode, returning you to ex.
  691.  
  692.    Digit registers don't work entirely correctly - there are
  693. circumstances in which separate lines of a change/deletion are supposed
  694. to go into separate registers
  695.  
  696.    `:set lisp' has no effect, however, emacs does largely take care of
  697. any lisp'ish behaviour you'd want automatically if the file you're
  698. editing is suffixed with `.l' or `.el'.  One particular loss, however,
  699. is that `)' and `(' don't work on s-expressions like they would in vi
  700. with lisp set.
  701.  
  702. 
  703. File: evi.info,  Node: Ex commands,  Next: Note to vip users,  Prev: Differences,  Up: Top
  704.  
  705. Supported ex commands and variable settings
  706. ===========================================
  707.  
  708.    The following ex commands are supported in Evi:
  709.      abbrev, cd, chdir, copy, delete, edit, file, global, map, move, next,
  710.      preserve, print, put, quit, read, recover, set, shell, source, substitute,
  711.      tag, unabbrev, unmap, write, wq, yank, !, <, >, &
  712.  
  713.    The following ex variable settings are supported in Evi:
  714.      autoindent, errorbells, ignorecase, magic, notimeout, shell,
  715.      shiftwidth, showmatch, tabstop, wrapmargin, wrapscan
  716.  
  717. 
  718. File: evi.info,  Node: Note to vip users,  Next: Bugs,  Prev: Ex commands,  Up: Top
  719.  
  720. Note to vip users
  721. =================
  722.  
  723.    Undo does not continue via `.'.  This is incompatible with vi - the
  724. sequence `u.' in vi means `undo, then do again', whereas in vip it means
  725. `undo, then undo some more.'  For the vip functionality use
  726. evi-undo-more, described in the section on enhancements.
  727.  
  728.    The vip commands for editing a file (`v' and `V') and switching
  729. buffers (`s', and `S') are not supported.  Use `:e', `:E', `:b', and
  730. `:B' instead.  See previous section on file and buffer management, or
  731. try these cute macros which are (mostly) functional replacements,
  732. including doing file and buffer completion (note the space on the end
  733. of the line):
  734.      :map v :edit |map V :Edit |map K :kill |map s :buffer |map S :Buffer
  735.  
  736.    `:q' exits emacs.  I believe the default behaviour in vip is to
  737. simply kill the current buffer (a concept vi doesn't really have) -
  738. either that or quit vi emulation.  Any of these choices is reasonable,
  739. however, given `:k' for killing buffers (a new command for a new
  740. concept), and `Q' for exiting vi emulation, I chose to have `:q' do
  741. exactly what it does in vi.
  742.  
  743. 
  744. File: evi.info,  Node: Bugs,  Next: Mailing list,  Prev: Note to vip users,  Up: Top
  745.  
  746. What to do if things go wrong
  747. =============================
  748.  
  749.    There are still some glitches in evi, of course, and if you encounter
  750. one, please email me what went wrong, in as much detail as you can.  My
  751. address is jlewis@cse.ogi.edu.  In the meantime, if Evi doesn't seem to
  752. be responding, or you're having difficulty getting out of some mode,
  753. first try `C-c' (this is vi's interrupt character), then if you're still
  754. in a pickle, try `C-g' (this is emacs' interrupt character - there are
  755. some situations that you might get into where it works instead of
  756. `C-c').
  757.  
  758. 
  759. File: evi.info,  Node: Mailing list,  Next: Getting a copy of Evi,  Prev: Bugs,  Up: Top
  760.  
  761. Mailing list
  762. ============
  763.  
  764.    There is a mailing list for discussion of evi - usage, bugs, new
  765. features, etc.  To join the list, send a note to
  766. evi-list-request@brandx.rain.com including your e-mail address in the
  767. body of the message.  To submit to the list, send mail to
  768. evi-list@brandx.rain.com.
  769.  
  770. 
  771. File: evi.info,  Node: Getting a copy of Evi,  Next: Credits,  Prev: Mailing list,  Up: Top
  772.  
  773. Getting a copy of Evi
  774. =====================
  775.  
  776.    You can obtain a copy of Evi via FTP from an elisp archive site, or
  777. from the mail-server on my machine (which will assure the most
  778. up-to-date version).  The main elisp-archive is at
  779. archive.cis.ohio-state.edu (in the directory gnu/emacs/elisp-archive) -
  780. Evi is in modes/evi.el.Z.  To get it from my mail-server, send a
  781. message to mail-server@brandx.rain.com containing:
  782.      send evi.el
  783.    - or -
  784.      send evi.el.Z
  785.    followed by:
  786.      end
  787.    `evi.el.Z' will be uuencoded for delivery.  Also, add `send index'
  788. if you want the file sizes.
  789.  
  790. 
  791. File: evi.info,  Node: Credits,  Prev: Getting a copy of Evi,  Up: Top
  792.  
  793. Credits
  794. =======
  795.  
  796.    Masahiko Sato - for having the audacity to write vip in the first
  797. place ;-) Eric Bensen - for being the first real advocate and those
  798. helpful folks who gave feedback on the first release and the following
  799. immensely helpful souls: James Montebello, Steven Dick, Mike Sangrey,
  800. Brian Divine, Bill Reynolds, Roger E. Benz, Richard Ryan, Volker
  801. Englisch, John Haugen, Calvin Clark, Sam Falkner, Mark Pulver and
  802. Cameron Gregory
  803.  
  804.  
  805. 
  806. Tag Table:
  807. Node: Top769
  808. Node: Overview1817
  809. Node: Setting up Evi2931
  810. Node: File and buffer management4055
  811. Node: Window management6844
  812. Node: Emacs commands8022
  813. Node: Emacs editing modes10195
  814. Node: Customizing10998
  815. Node: Arrow keys12923
  816. Node: Enhancements13838
  817. Node: Edit repeat command14342
  818. Node: Ex input escapes14747
  819. Node: Extended undo15359
  820. Node: Ex command completion16326
  821. Node: Word definition16884
  822. Node: Sentence and larger motions17585
  823. Node: Directory commands18382
  824. Node: Background shell commands18742
  825. Node: Unnamed register19104
  826. Node: New command counts19681
  827. Node: Rectangle edits and arbitrary regions20260
  828. Node: Shell window21988
  829. Node: Extended marks22808
  830. Node: Register enhancements24047
  831. Node: Language/mode specific editing24943
  832. Node: New operators25485
  833. Node: Differences28039
  834. Node: Ex commands29059
  835. Node: Note to vip users29689
  836. Node: Bugs30874
  837. Node: Mailing list31528
  838. Node: Getting a copy of Evi31919
  839. Node: Credits32602
  840. 
  841. End Tag Table
  842.